#pragma once
#ifndef SMPPBROADCASTSM_HPP
#define SMPPBROADCASTSM_HPP

#include "SMPPHeader.hpp"
#include "SMPPBroadcastRequestOptionalTLVs.hpp"
#include "SMPPBroadcastAreaIdentifier.hpp"
#include "SMPPBroadcastContentType.hpp"
#include "SMPPBroadcastRepNum.hpp"
#include "SMPPBroadcastFrequencyInterval.hpp"

namespace smpp {
namespace pdu{

class SMPP_DLLPRFX BroadcastSM : public Header,
public BroadcastRequestOptionalTLVs{
	CoctetString _ServiceType;
	quint8 _SourceAddrTON;
	quint8 _SourceAddrNPI;
	CoctetString _SourceAddr;
	CoctetString _MessageId;
	quint8 _PriorityFlag;
	CoctetString _ScheduleDeliveryTime;
	CoctetString _ValidityPeriod;
	quint8 _ReplaceIfPresentFlag;
	quint8 _DataCoding;
	quint8 _SMDefaultMsgId;
	BroadcastAreaIdentifier *_BroadcastAreaIdentifier;
	BroadcastContentType *_BroadcastContentType;
	BroadcastRepNum *_BroadcastRepNum;
	BroadcastFrequencyInterval *_BroadcastFrequencyInterval;
public:
	BroadcastSM(const Header &nHeader = Header(),
		const CoctetString &nServiceType = "",
		const quint8 nSourceAddrTON = 0,
		const quint8 nSourceAddrNPI = 0,
		const CoctetString &nSourceAddr = "",
		const CoctetString &nMessageId = "",
		const quint8 nPriorityFlag = 0,
		const CoctetString &nScheduleDeliveryTime = "",
		const CoctetString &nValidityPeriod = "",
		const quint8 nReplaceIfPresentFlag = 0,
		const quint8 nDataCoding = 0,
		const quint8 nSMDefaultMsgId = 0,
		const BroadcastAreaIdentifier *nBroadcastAreaIdentifier = 0,
		const BroadcastContentType *nBroadcastContentType = 0,
		const BroadcastRepNum *nBroadcastRepNum = 0,
		const BroadcastFrequencyInterval *
		nBroadcastFrequencyInterval = 0,
		const BroadcastRequestOptionalTLVs &
		nBroadcastRequestOptionalTLVs = BroadcastRequestOptionalTLVs());

	BroadcastSM(const BroadcastSM &);

	~BroadcastSM();

	void setServiceType(const CoctetString &);

	const CoctetString &getServiceType() const;

	void setSourceAddrTON(const quint8);

	const quint8 getSourceAddrTON() const;

	void setSourceAddrNPI(const quint8);

	const quint8 getSourceAddrNPI() const;

	void setSourceAddr(const CoctetString &);

	const CoctetString &getSourceAddr() const;

	void setMessageId(const CoctetString &);

	const CoctetString &getMessageId() const;

	void setPriorityFlag(const quint8);

	const quint8 getPriorityFlag() const;

	void setScheduleDeliveryTime(const CoctetString &);

	const CoctetString &getScheduleDeliveryTime() const;

	void setValidityPeriod(const CoctetString &);

	const CoctetString &getValidityPeriod() const;

	void setReplaceIfPresentFlag(const quint8);

	const quint8 getReplaceIfPresentFlag() const;

	void setDataCoding(const quint8);

	const quint8 getDataCoding() const;

	void setSMDefaultMsgId(const quint8);

	const quint8 getSMDefaultMsgId() const;

	void setBroadcastAreaIdentifier(const BroadcastAreaIdentifier *);

	const BroadcastAreaIdentifier *getBroadcastAreaIdentifier() const;

	void setBroadcastContentType(const BroadcastContentType *);

	const BroadcastContentType *getBroadcastContentType() const;

	void setBroadcastRepNum(const BroadcastRepNum *);

	const BroadcastRepNum *getBroadcastRepNum() const;

	void setBroadcastFrequencyInterval(
		const BroadcastFrequencyInterval *);

	const BroadcastFrequencyInterval *
		getBroadcastFrequencyInterval() const;

	void calcCommandLength();
};

}
}

#endif
